package com.pikaqiu.warehouse.config;

import com.pikaqiu.warehouse.interceptor.ContextInterceptor;
import com.pikaqiu.warehouse.interceptor.LoggingInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Administrator
 * @Date: 2024/7/26
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new ContextInterceptor());
        registry.addInterceptor(new LoggingInterceptor());
    }
}
